<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=Windows-1252">

<TITLE>Quick start: archiving files from the command line</TITLE>
<link href="style.css" rel="stylesheet" type="text/css">
</HEAD>

<BODY>

<P class="title"><A NAME="HELPSimpleCommandLineArchiving"></A>Quick
start: archiving files from the command line<hr></P>

<P>The common command line syntax for archiving files is:</P>

<p class="sample">WinRAR A [ -switches ] &lt;Archive&gt; [ Files ] [ @File lists ]</p>

<P>For example, if you wish add the file <B>LETTER.TXT</B> to the
archive<B> LETTERS.RAR</B>, type:</P>

<p class="sample">WinRAR A LETTERS.RAR LETTER.TXT</p>

<P>If an archive extension is not specified, WinRAR will use the default
archive format selected in the default <A HREF="HELPProfiles.htm">compression
profile</A>, but you may override it by specifying either .RAR or .ZIP
extension.</P>

<P>The next example: add all <B>*.WAV</B> files to the solid RAR archive
<B>Songs</B>:</P>

<p class="sample">WinRAR A -S Songs.RAR *.WAV</p>

<P>It is also possible to list the files to be archived in a file,
rather than listing them in the command line. In this case the name
of text file, containing the list of files to be archived, must be given
in the command line. This is indicated by placing the symbol <B>@</B>
before this file name. Thus, you can create a file <B>Binaries</B>,
containing the strings <B>*.exe</B> and <B>*.com</B> and execute
the command:</P>

<p class="sample">WinRAR A TOOLS.ZIP @Binaries</p>

<P>to add all files with <B>.EXE</B> and .<B>COM</B> extensions
from the current folder to ZIP archive <B>TOOLS</B>.</P>

<P>Window containing statistics is displayed during the archiving process.
If you wish to break archiving, click on "Cancel" button in the command
window. You may press "Background" button in this window to minimize WinRAR
to the tray. If archiving is completed without problems, WinRAR terminates.
Diagnostic messages window is displayed in case of error.</P>

<P>See <A HREF="HELPCommandLineSyntax.htm"><B>Command-line interface</B>
</A> for detailed descriptions of commands and switches.</P>

</BODY>
</HTML>
